Repository navigation
Conversation
…s added uploadExistingData skipped both types, so a service added after Loop had been running (for example Tidepool after Nightscout) didn't get the earlier overrides or CGM events until the next override change or CGM event.
Collaborator
Author
|
Tested in the Simulator with this branch (a02b5a1) and TidepoolService 272baa0, on existing data with Nightscout running and about 25k pump events:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a remote data service is added,
uploadExistingDatauploads what Loop already has stored, but it skipped overrides and CGM events. Both use the same per-service query anchors as the other types, so a newly added service starts from nil and they would be uploaded in full; they just weren't triggered until something changed.Tested in the Simulator on next-dev by adding Tidepool after Nightscout had been running: glucose, carbs, doses, dosing decisions, pump events and settings were all backfilled, but the Walking preset that was active when Tidepool was added only reached Tidepool after it was ended. If no override changes after the service is added, earlier overrides never go up. CGM events (sensor and transmitter starts) were in the same position for Nightscout.
This adds both to
uploadExistingData. Tidepool doesn't store CGM events yet (TidepoolService.uploadCgmEventDatais a no-op), so for Tidepool the change only affects overrides.